const { ObjectId } = require('mongodb');
const { IncAndExp } = require('../../../model/incAndExp/incAndExp');



module.exports = async (req, res) => {
    req.fields = {
        ...req.fields,
        budget: '500',
        balance: '',
    }
    IncAndExp.updateOne({
        _id: ObjectId(req.fields.id)
    }, req.fields).then(result => {
        res.send({ 'code': 0, "msg": "编辑成功" });
    })
}